From: Bilal Elmoussaoui Date: Tue, 14 Apr 2026 17:39:48 +0000 (+0200) Subject: croco: Remove unnecessary NULL checks X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~10^2^2~51 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d0b846bd5c3b43070cbe29ae80f8179d161613e6;p=gnome-shell.git croco: Remove unnecessary NULL checks As g_free is NULL safe anyways Part-of: --- diff --git a/src/st/croco/cr-simple-sel.c b/src/st/croco/cr-simple-sel.c index bac862187..07a53676c 100644 --- a/src/st/croco/cr-simple-sel.c +++ b/src/st/croco/cr-simple-sel.c @@ -317,7 +317,5 @@ cr_simple_sel_destroy (CRSimpleSel * a_this) cr_simple_sel_destroy (a_this->next); } - if (a_this) { - g_free (a_this); - } + g_free (a_this); } diff --git a/src/st/croco/cr-statement.c b/src/st/croco/cr-statement.c index 45e305e58..0596eff53 100644 --- a/src/st/croco/cr-statement.c +++ b/src/st/croco/cr-statement.c @@ -1130,8 +1130,7 @@ cr_statement_new_ruleset (CRStyleSheet * a_sheet, if (!result->kind.ruleset) { cr_utils_trace_info ("Out of memory"); - if (result) - g_free (result); + g_free (result); return NULL; } diff --git a/src/st/croco/cr-term.c b/src/st/croco/cr-term.c index b527d954f..669594ecb 100644 --- a/src/st/croco/cr-term.c +++ b/src/st/croco/cr-term.c @@ -779,8 +779,6 @@ cr_term_destroy (CRTerm * a_this) a_this->next = NULL; } - if (a_this) { - g_free (a_this); - } + g_free (a_this); }